
///
/// This is the common include file with all shared stuff
///

#ifndef COMMON_H
#define COMMON_H

#define TFTP_PORT 50000 
#define TFTP_PORT_STR "50000"
#define SOCKET_TYPE SOCK_DGRAM
#define STDIN fileno(stdin)
#define MSG_BUF_SIZE 1024

#define DATA_BLOCK_SIZE 512
#define END_BYTE 0

typedef enum
{
	ERROR_NOT_DEFINED = 0,
	ERROR_FILE_NOT_FOUND,

} ERROR_TYPE;

typedef enum
{
	OPCODE_RRQ = 1,
	OPCODE_WRQ,
	OPCODE_DATA,
	OPCODE_ACK,
	OPCODE_ERROR

} OPCODE_TYPE;

typedef enum
{
	STATE_SENDING,

} STATE_TYPE;

#endif
